<%@ page language="java" import="java.util.*,org.model.Article,org.model.ArtAndProClass,org.model.Product" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>大家好我是拷贝忍者！Mir.刘</title>
		<link rel="stylesheet" href="css/all.css" type="text/css" media="screen">
		<link rel="stylesheet" href="css/style.css" type="text/css" media="screen">
		<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon">
		<script type="text/javascript" src="js/jquery-1.12.3.min.js"></script>
		<script>
			$(function() {
				$(".carousel-control").click(function() {
					if ($(this).attr("data-slide") == 'prev') {
						if ($(".item.inshow").prev(".item").length == 0) {
							//不存在前一个item
							$(".item:last").addClass("next");
						} else {
							//存在前一个item
							$(".item.inshow").prev(".item").addClass("next");
						}
					} else {
						if ($(".item.inshow").next(".item").length == 0) {
							//不存在后一个item
							$(".item:first").addClass("next");
						} else {
							//存在后一个item
							$(".item.inshow").next(".item").addClass("next");
						}
					}
					$(".item.next").css("display","block");
					$(".item.inshow").css("display","none");
					$(".item.inshow").removeClass("inshow");
					$(".item.next").removeClass("next").addClass("inshow");
				});
			});
		</script>
	</head>
	<body class="index" style="zoom: 1;">
		<div style="position:relative;width:70%;left:15%">
			<%@ include file="head.jsp"%>
			<div class="page-container">
				<div class="page-wrapper">
					<div class="page-content">
						<div id="focus" class="block-list">
							<div class="row focus-top" data-default-grid="12">
								<div class="col-auto col-md-12" data-grid="12" data-row="0">
									<div id="slide" class="carousel slide" data-ride="carousel">
										<div class="carousel-inner">
											<div class="item inshow" data-target="" style="display: block;">
												<img src="img/1.jpg">
												<div class="carousel-caption">
													<h2 style="color:#D0FFFD"></h2>
													<div></div>
												</div>
											</div>
											<div class="item" data-target="" style="display: none;">
												<img src="img/2.jpg">
												<div class="carousel-caption">
													<h2 style="color:#FFF"></h2>
													<div></div>
												</div>
											</div>
											<div class="item" data-target="" style="display: none;">
												<img src="img/3.jpg">
												<div class="carousel-caption">
													<h2 style="color:#FFF"></h2>
													<div></div>
												</div>
											</div>
										</div>
										<div class="left carousel-control" data-slide="prev"> <i class="icon-prev"></i> </div>
										<div class="right carousel-control" data-slide="next"> <i class="icon-next"></i> </div>
									</div>
								</div>
							</div>
							<div class="row focus-middle" data-default-grid="4">
								<div class="col-md-12" data-grid="12" data-row="0">
									<div id="block3" class="panel-cards panel panel-block " style="height: auto;">
										<div class="panel-heading">
											<strong><i class="icon-th"></i>  最新特产</strong>
										</div>
										<div class="panel-body">
											<div class="cards cards-borderless">
												<c:if test="${product.size()!=0 }">
													<c:forEach items="${requestScope.product }" var="isproduct">
														<div class="col-md-4 col-sm-6">
															<a class="card" href="productDetail.action?productId=${isproduct.productId }">
																<div class="media">
																	<img src="${isproduct.images }" title="${isproduct.productName }" alt="${isproduct.productName }">
																</div>
																<div class="card-heading">
																	${isproduct.productName }
																	<span class="text-latin">&nbsp;&nbsp;<strong class="text-danger">￥${isproduct.price }</strong></span>
																</div>
															</a>
														</div>
													</c:forEach>
												</c:if>
												<c:if test="${product.size()==0 }">
													<div class="col-md-4 col-sm-6">
														<a class="card" href="Home.action">
															<div class="media"><img src="img/emptyProduct.gif" title="没有特产" alt="没有特产">
															</div>
														</a>
													</div>
												</c:if>
											</div>
										</div>
									</div>
								</div>
								<div class="col-md-4" data-grid="4" data-row="1">
									<div id="block10" class="panel panel-block " style="height: 264px;">
										<div class="panel-heading">
											<strong><i class="icon-group"></i> 社区简介</strong>
											<div class="pull-right"><a href="articleDetail.action?articleId=0">详情</a>
											</div>
										</div>
										<div class="panel-body">
											<div class="article-content" style="overflow:scroll;height:213px;">${notice.getArticleContext()}</div>
										</div>
									</div>
								</div>
								<div class="col-md-4" data-grid="4" data-row="1">
									<div id="block1" class="panel panel-block " style="height: 264px;">
										<div class="panel-heading">
											<strong><i class="icon-list-ul"></i> 最新文章</strong>
										</div>
										<div class="panel-body">
											<ul class="ul-list">
												<c:forEach items="${newestArticle10 }" var="list">
												<li>
													<a href="articleDetail.action?articleId=${list.articleId} " title="${list.articleTitle}">${list.articleTitle}</a>
												</li>
												</c:forEach>
											</ul>
										</div>
									</div>
								</div>
								<div class="col-md-4" data-grid="4" data-row="1">
									<div id="block9" class="panel panel-block " style="height: 264px;">
										<div class="panel-heading">
											<strong><i class="icon-phone"></i> 联系我们</strong>
										</div>
										<div class="panel-body">
											<table class="table table-data">
												<tbody>
													<tr>
														<th>联系人：</th>
														<td>TWH</td>
													</tr>
													<tr>
														<th>电话：</th>
														<td><a href="tel:15674361170">15673317560</a>
														</td>
													</tr>
													<tr>
														<th>Email：</th>
														<td><a href="mailto:915843972@qq.com">619216565@qq.com</a></td>
													</tr>
													<tr>
														<th>QQ：</th>
														<td><a href="http://wpa.qq.com/msgrd?v=3&uin=1824342743&site=%E4%BA%94%E6%98%9F%E7%A4%BE%E5%8C%BA&menu=yes" target="_blank">1824342743</a>
														</td>
													</tr>
													<tr>
														<th>微信：</th>
														<td>ZRG</td>
													</tr>
													<tr>
														<th>网址：</th>
														<td><a href="http://user.qzone.qq.com/619216565/infocenter?ptsig=N*bym4Z9*J1f8U3c4mAI2JV*bxoGtFzN6r37yooQ1To_/" target="_blank">MyQzone</a>
														</td>
													</tr>
													<tr>
														<th>地址：</th>
														<td>湖南省株洲市河西工大</td>
													</tr>
												</tbody>
											</table>
										</div>
									</div>
								</div>
							</div>
							<div class="row focus-bottom" data-default-grid="6">
								<div class="col-auto col-md-12" data-grid="12" data-row="0">
								</div>
							</div>
						</div>
						<div class="row all-bottom">
							<div class="col-md-12"></div>
						</div>
					</div>
				</div>
			</div>
			<%@ include file="foot.jsp"%>
		</div>
	</body>

</html>
